microsoft excel 您所在的位置:网站首页 binary to text free online binary to text microsoft excel

microsoft excel

2022-05-08 06:46| 来源: 网络整理| 查看: 265

I have a short VBA function that produces a binary representation of a text string:

Public Function TextToBin(S As String) As String Dim i As Long, L As Long L = Len(S) With Application.WorksheetFunction For i = 1 To L TextToBin = TextToBin & .Dec2Bin(Asc(Mid(S, i, 1))) Next i End With End Function

For example:

enter image description here

I have been asked to replace this UDF with a simple formula so the application can run in a macro-free environment.

My current workaround is to place:

=IFERROR(DEC2BIN(CODE(MID($A$1,COLUMNS($A:A),1))),"")

in cell B1 and copy across. Then, in another cell, use:

=TEXTJOIN("",TRUE,B1:IV1)

However, I do not want to admit that the best we can do is to use over sixteen thousand helper cells!

Is there a simple, compact method to get the same result ??



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有